// 禁用样式
@mixin f-k-disabled {
  background-color: $farris-input-disabled-bg;
  color: $f-text-07;
  border-color: $farris-input-disabled-bg;
}


@mixin f-set-bg-text-border($f-background, $f-text, $f-border-color) {
  color: $f-text;
  background-color: $f-background;
  border-color: $f-border-color;
}

@mixin f-btn-icon-size() {
  $f-btn-icon-size: ($farris-btn-icon-padding-y * 2)+$farris-btn-icon-line-height * $farris-btn-icon-font-size +0.125rem;
  width: $f-btn-icon-size;
  height: $f-btn-icon-size;
}

@mixin f-bt-form-validation-state($f-state, $f-color) {
  .farris-input-wrap {

    .form-control,
    .custom-select {

      .was-validated &:#{$f-state},
      &.is-#{$f-state} {
        border-color: $f-color;

        &:focus {
          border-color: $f-color;
          box-shadow: 0 0 0 $f-input-focus-width rgba($f-color, 0.25);
        }
      }
    }

    .form-check-input {
      .was-validated &:#{$f-state} {
        ~.form-check-label {
          color: $f-color;
        }

        ~.#{$f-state}-feedback,
        ~.#{$f-state}-tooltip {
          display: block;
        }
      }
    }

    .custom-control-input {
      .was-validated &:#{$f-state} {
        ~.custom-control-label {
          color: $f-color;

          &::before {
            background-color: f-color-offset($f-color, 25%, 'lighten');
          }
        }

        &:checked {
          ~.custom-control-label::before {
            @include f-background-has-gradient(f-color-offset($f-color, 10%, 'lighten'));
          }
        }

        &:focus {
          ~.custom-control-label::before {
            box-shadow: 0 0 0 1px $f-body-bg,
              0 0 0 $f-input-focus-width rgba($f-color, 0.25);
          }
        }
      }
    }

    .custom-file-input {
      .was-validated &:#{$f-state} {
        ~.custom-file-label {
          border-color: $f-color;

          &::after {
            border-color: inherit;
          }
        }

        &:focus {
          ~.custom-file-label {
            box-shadow: 0 0 0 $f-input-focus-width rgba($f-color, 0.25);
          }
        }
      }
    }
  }
}

/*输入控件按钮icon图标*/
%f-apperance_input_icon {
  background-color: $farris-input-icon-bg;
  border-color: $farris-input-icon-border-color;
  color: $farris-input-icon-color;
}

%f-apperance_input_icon_hover {
  background-color: $farris-input-icon-hover-bg;
  border-color: $farris-input-icon-hover-border-color;
  color: $farris-input-icon-hover-color;
}

%f-apperance_input {

  border-color: $farris-input-border-color;
}

@mixin f-apperance($f-what) {
  @if ($f-what ==input) {
    @extend %f-apperance_input;
  }

  @if ($f-what ==input-icon) {
    @extend %f-apperance_input_icon;
  }

  @if ($f-what ==input-icon-hover) {
    @extend %f-apperance_input_icon_hover;
  }
}

@mixin f-apperance_input {
  @extend %f-apperance_input;
}

@mixin f-apperance_button {
  @extend %f-apperance_button;
}

@mixin f-make-grid-width-columns($f-columns: $f-grid-columns,
  $f-gutter: $f-grid-gutter-width ) {
  %f-grid-column {
    position: relative;
    min-height: 1px;
    padding-right: ($f-gutter / 2);
    padding-left: ($f-gutter / 2);
  }

  @for $f-i from 1 through $f-columns {

    .f-col-w#{$f-i},
    .f-col-h#{$f-i} {
      @extend %f-grid-column;
    }

    .f-col-w#{$f-i} {
      width: percentage($f-i / $f-columns);
    }

    .f-col-h#{$f-i} {
      height: percentage($f-i / $f-columns);
    }
  }
}